<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>过渡效果 transition</title>
    <style>
        div
        {
            width:100px;
            height:100px;
            background:red;
            transition:width 2s;
            -webkit-transition:width 2s; /* Safari */
        }

        div:hover
        {
            width:300px;
        }
    </style>
</head>
<body>
<div></div>
</body>
</html>
